﻿Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        'MsgBox(Application.StartupPath)
        Dim streamPen As New System.IO.StreamWriter(Application.StartupPath & "\123.txt")
        streamPen.WriteLine(RichTextBox1.Text)
        streamPen.Close()
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class
''Public Class Form1
''Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

''Dim car1 = New Car()
''car1.setBand("小米SU7")
''MsgBox(car1.getBand())
''End Sub

''Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

''nd Sub
''End Class


''Class Car

''Dim band As String
''Dim price As Integer

''Public Function getBand() As String
''Return Me.band
''  End Function

''Public Sub setBand(b As String)
''Me.band = b
''nsole.WriteLine("设置车牌名称")
''End Sub
''
''Public Function getPrice() As Integer
''Return Me.price
''  End Function

''   Public Sub setPrice(p As Integer)
''       Me.price = p
''   End Sub

''End Class